<?php
require("config/config.php");
$mysql = new SaeMysql(); 
 
$content= addslashes(strip_tags( $_REQUEST['content'] ));
$bid= strip_tags( $_REQUEST['bid'] );
$uid= strip_tags( $_REQUEST['uid'] );
$anony= strip_tags( $_REQUEST['anony'] );
 
if(isset($content) && is_numeric($bid) && is_numeric($uid) && is_numeric($anony)){
	$sql = "INSERT  INTO `comment` ( `cid` , `content` , `bid`, `uid`,`anony`,`date`) VALUES ( '','"  . $mysql->escape($content) . "' , '"  . $mysql->escape($bid) . "', '"  . $mysql->escape($uid) . "', '".$anony."',NOW()) ";
	$mysql->runSql( $sql );
	 
	if( $mysql->errno() != 0 )
	{
		echo "false";
	}else{
		echo "true";
	}
}else{
	echo "false";
}

$mysql->closeDb();
?>